<?php
  include('lock.php');
  //remove from cart upon clicking remove
  if($_SERVER["REQUEST_METHOD"] == "POST")
  {
    if(isset($_POST['removeID']))
    { 
      $remove=addslashes($_POST['removeID']);  
      $q=mysql_query("SELECT * FROM cart WHERE demo_ID='$remove'");
      $data_fetch=mysql_fetch_array($q);
      $cart_id=$data_fetch['cart_ID'];

      $sql=("DELETE FROM cart WHERE user_ID='$login_session' AND cart_ID='$cart_id'");
      mysql_query($sql);
      echo"demo". $remove." deleted!"."<br/>";
      header('Location: index2.php');
    }
  } 
?>